﻿using System.Windows;
using Catel.Articles.Base.UI.ViewModels;
using Catel.Articles.Base.UI.Windows;

namespace Catel.Articles._01___Data_handling
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Application.Startup"/> event.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param>
        protected override void OnStartup(StartupEventArgs e)
        {
            // Call base
            base.OnStartup(e);

            // Create style forwarders
            Catel.Windows.StyleHelper.CreateStyleForwardersForDefaultStyles();

            // Show example window
            ExamplesViewModel viewModel = new ExamplesViewModel("Catel 01 / n - Handling data the right way");
            ExamplesWindow examplesWindow = new ExamplesWindow(viewModel);
            examplesWindow.ShowDialog();
        }
    }
}
